<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd“>
<html>
<head>
	<meta charset="UTF-8">
	<title>体温监控系统</title>
    <link rel="stylesheet" type="text/css" href="css/normalize.css">
    <link rel="stylesheet" type="text/css" href="css/common.css">
	<script type="text/javascript" src="js/jquery.min.js"></script>
    <script src="js/common.js"></script>
    <style>
		.main{width:980px; margin:0px auto;}
		.roombox{margin: 10px 0px;}
		.roombox .title{}
		.roombox .bedbox li{border: solid 1px #ccc; height: 200px; width: 100px; margin: 10px 0px; float: left; width: 313px; height: 500px; margin-right: 11px;}
		.bedmoreinfo{ width: 651px; height: 500px; border: solid 1px #ccc; display: none; position:  absolute; background: #fff; border-left: none}
		
		#page{height:100%;width:100%;background:none; font-family:"微软雅黑"; position:fixed; left:0px; top:0px; z-index:0}
		 .fr{float:right}
		.tab_list{margin:0 auto;width:964px;padding-right:16px;}
		.tab_head{width:964px;height:40px;padding-right:16px;}
		.tab_body{width:964px;padding-right:16px;}
		.tab_a{font-size:16px;color:#0191ff;line-height:40px;}
		.tab_b{font-size:14px;color:#667078;line-height:30px;}
		.tab_c{font-size:12px;color:#383838;line-height:40px;}
		.tab_d{font-size:14px;color:#383838;line-height:22px;}
		
		.add_one{padding:2px 4px;font-size:12px;color:#0191ff;border:1px solid #0191ff;margin-top:10px}
		.page_number{width:22px;height:22px;border:1px solid #0191ff;margin-left:8px; text-align:center}
		.page_number span{display: block; cursor:pointer}
		.page_gray{width:22px;height:22px;border:1px solid #d2dde5;margin-left:8px; text-align:center}
		.page_gray span{display: block; cursor:pointer}
		
		.page_ge{width:964px;height:40px;padding-right:16px;margin-top:30px;}
		
    </style>
 <script>
  var pageSize = 15; //每页显示个数
  var nowpage = 1; //当前第几页
  var totalPages = 1;

  $(function(){
   getListData();
   function addlisten(){
    $(".pagenumbox").find(".fr").off("click")
    $(".pagenumbox").find(".fr").click(function(){
     nowpage = $(this).text();
     getListData();
    })
    $(".prevPageBt").off("click");
    $(".prevPageBt").click(function(){
     if(nowpage == 1){
      return;
     }else{
      nowpage--;
     }
     getListData();
    })
    $(".nextPageBt").off("click");
    $(".nextPageBt").click(function(){
     if(nowpage == totalPages){
      return;
     }else{
      nowpage++;
     }
     getListData();
    })
   }

   function delPerson(){
    $.ajax({
     type:"post",
     url:"returnTrue.json",//此处返回true或false
     dataType:"json",
     data:{},
     success:function(data){
      $(".modelbg").hide();
      $(".confirmbox").hide();
     }
    })
   }

   function putPageNum(){
    $(".pagenumbox").empty();
    var startPage = 1;
    if(nowpage > 3){
     if((totalPages - nowpage) >= 2){
      startPage = nowpage-2;
     }else{
      startPage = nowpage-(4-(totalPages - nowpage));
     }

    }else{
     startPage = 1;
    }
    // $(".page_ge").
    var forcount = 5;
    if(totalPages >= 5){
     forcount = 5;
    }else{
     forcount = totalPages;
    }

    for(var i = 0; i < forcount; i++){
     var tempPage = startPage+forcount-1-i;
     var tempClass = "page_gray";
     if(tempPage == nowpage){
      tempClass =  "page_number"
     }else{
      tempClass = "page_gray";
     }
     $(".pagenumbox").append(' <div class="'+tempClass+' fr">'+
     '<span class="tab_d">'+tempPage+'</span>'+
     '</div>')
    }
   }

   function getListData(){
    $.ajax({
     type:"post",
     url:"equip/list.action",//此处返回true或false
     dataType:"json",
     data:{"pageNo":nowpage,"pageSize":pageSize},
     success:function(data){
      if(data.total%pageSize != 0){
       totalPages = parseInt(data.total/pageSize) +1;
      }else{
       totalPages =  parseInt(data.total/pageSize);
      }
      putPageNum();
      putData(data.rows);
      $("#deviceCount").text("共"+data.total+"条数据")
     }
    })
   }

   function putData(data){
    $(".listbox").empty();
    $(".listbox").append('  <tr style=" background:#e4eff7;">'+
    '<td align="center"><span class="tab_b">序号</span></td>'+
    '<td align="center"><span class="tab_b">设备</span></td>'+
    '<td align="center"><span class="tab_b">消息ID</span></td>'+
    '<td align="center"><span class="tab_b">消息长度</span></td>'+
    '<td align="center"><span class="tab_b">消息流水号</span></td>'+
    '<td align="center"><span class="tab_b">采集时间</span></td>'+
    '<td align="center"><span class="tab_b">温度1</span></td>'+
    '<td align="center"><span class="tab_b">温度2</span></td>'+
    '<td align="center"><span class="tab_b">电量</span></td>'+
     '<td align="center"><span class="tab_b">效验和</span></td>'+
    '</tr>');

    $(data).each(function(index,dom){
     $(".listbox").append('  <tr style=" border-bottom:1px solid #e4ebf1;">'+
     '<td align="center"><span class="tab_b">'+dom.no+'</span></td>'+
     '<td align="center"><span class="tab_b">'+dom.device+'</span></td>'+
     '<td align="center"><span class="tab_b">'+dom.msgid+'</span></td>'+
     '<td align="center"><span class="tab_b">'+dom.msglength+'</span></td>'+//+'/'+dom.age
     '<td align="center"><span class="tab_b">'+dom.msgwater+'</span></td>'+
     '<td align="center"><span class="tab_b">'+dom.time+'</span></td>'+
     '<td align="center"><span class="tab_b">'+dom.degree1+'</span></td>'+
     '<td align="center"><span class="tab_b">'+dom.degree2+'</span></td>'+
     '<td align="center"><span class="tab_b">'+dom.dian+'</span></td>'+
     '<td align="center"><span class="tab_b">'+dom.sum+'</span></td>'+
     '</tr>');
    })
    addlisten()
   }
  })
 </script>
</head>

<body>
<div id="page" style="overflow: auto;">
         <div class="header clearfix">
			<div class="headermain clearfix">
				<div class="logo"></div>
                <div class="nav"><a href="degreelisten.html" >温度监控</a><a href="dossierManage.html" >档案管理</a><a href="deviceManage.html" class="checked">设备管理</a> </div>
<!--              <div class="logininfo"><span>协和医院 · 住院部</span> | <span class="loginname">王可人</span> <a href="javascript:void(0)" class="updpwdbt">修改密码</a> </div> -->
			</div>
		</div>
        <div class="tab_list">
            <div class="tab_head"><img src="images/nu.png" style="margin-bottom:-2px;margin-right:5px;"><span id="deviceCount" class="tab_a">共0条数据</span>

            </div>
            <div class="tab_body">
              <table width="964" class="listbox" border="0" cellspacing="0" cellpadding="0"  >
  <tr style=" background:#e4eff7;">
    <td align="center"><span class="tab_b">序号</span></td>
    <td align="center"><span class="tab_b">设备</span></td>
    <td align="center"><span class="tab_b">消息ID</span></td>
    <td align="center"><span class="tab_b">消息长度</span></td>
    <td align="center"><span class="tab_b">消息流水号</span></td>
    <td align="center"><span class="tab_b">采集时间</span></td>
    <td align="center"><span class="tab_b">温度1</span></td>
    <td align="center"><span class="tab_b">温度2</span></td>
    <td align="center"><span class="tab_b">电量</span></td>
    <td align="center"><span class="tab_b">效验和</span></td>
  </tr>

</table>
<div class="page_ge">
<div class="page_gray fr nextPageBt">
<span class="tab_d">></span>
</div>
<div class="pagenumbox">
<div class="page_gray fr">
<span class="tab_d">5</span>
</div>
<div class="page_gray fr">
<span class="tab_d">4</span>
</div>
<div class="page_gray fr">
<span class="tab_d">3</span>
</div>
<div class="page_gray fr">
<span class="tab_d">2</span>
</div>
<div class="page_number fr">
<span class="tab_d">1</span>
</div>
</div>
<div class="page_gray fr prevPageBt">
<span class="tab_d"><</span>
</div>
</div>
 </div>
        </div>
</div>

<div class="modelbg"></div>
<div class="confirmbox">
 <div class="text" >确认删除吗？</div>
 <a href="javascript:void(0)" class="yes">确认</a><a href="javascript:void(0)" class="cancel">取消</a>
</div>
<div class="addpersonbox">
 <div class="text" >
  <div class="title">添加病人</div>
  <div class="nav"><a href="javascript:void(0)" class="checked personbt" onclick="$('.persontab').show();$('.tiepiantab').hide();$('.tiepianbt').removeClass('checked');$(this).addClass('checked')">病人信息</a>
   <a href="javascript:void(0)" class="tiepianbt" onclick="$('.persontab').hide();$('.tiepiantab').show();$('.personbt').removeClass('checked');$(this).addClass('checked')">贴片信息</a> </div>
  <table class="persontab">
   <tr><td>病人姓名</td><td><input name="name" type="text"></td></tr>
   <tr><td>性别</td><td>男 &nbsp;<input name="sex" type="radio"> &nbsp;  &nbsp; 女 &nbsp;<input name="sex" type="radio"></td></tr>
   <tr><td>年龄</td><td><input name="age" type="text"></td></tr>
   <tr><td>入院时间</td><td><input name="roomtime" type="text"></td></tr>
   <tr><td>所患疾病</td><td><input name="sickname" type="text"></td></tr>
   <tr><td>主管医生</td><td><input name="doctor" type="text"></td></tr>
   <tr><td>病床号</td><td><input name="bedid" type="text"></td></tr>
   <tr><td>身份证</td><td><input name="personid" type="text"></td></tr>
   <tr><td>住址</td><td><input name="address" type="text"></td></tr>
   <tr><td>就医类型</td><td><input name="sicktype" type="text"></td></tr>
  </table>
  <table class="tiepiantab" style="display: none">
   <tr><td>贴片号码</td><td><input name="cardname" type="text"></td></tr>
   <tr><td>温度监控范围</td><td><select name="highc"><option>35</option><option>36</option><option>37</option><option>38</option><option>39</option></select> ~ <select name="lowc"><option>41</option><option>40</option><option>39</option><option>38</option><option>37</option></select></td></tr>
  </table>
 </div>
 <a href="javascript:void(0)" class="" onclick="sureAddPersonCom()">确认</a><a href="javascript:void(0)" class="" onclick="$('.addpersonbox').hide();$('.modelbg').hide()">关闭</a>
</div>

<div class="updpwdbox">
 <div class="text" >
  <div class="title">修改密码</div>
  <table class="persontab">
   <tr><td>原密码</td><td><input name="oldpwd" type="password"></td></tr>
   <tr><td>新密码</td><td><input name="newpwd" type="password"></td></tr>
   <tr><td>确认新密码</td><td><input name="surenewpwd" type="password"></td></tr>
  </table>
 </div>
 <a href="javascript:void(0)" class="" onclick="updpwd()">确认</a><a href="javascript:void(0)" class="" onclick="closeupdpwd()">关闭</a>
</div>
</body>
</html>
